<template>
	<view class="book-item-text" @tap="pik">
		<view class="www">
			<h3>{{idx+1}}</h3>
		</view>
		<view class="">
			<image :src="paihangbangbook.bookImg" mode=""></image>
		</view>
		<view class="comment">
			<h2>{{paihangbangbook.bookName}}</h2>
			<p>作者：{{paihangbangbook.bookAuthor}}</p>
			
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		props: {
			paihangbangbook: {
				type: Object,
				required: true
			},
			idx:0,
		},
		methods: {
			pik(){
				console.log(this.paihangbangbook.bookId)
				uni.navigateTo({
					url:"/pages/bookdetailed/bookdetailed?id="+this.paihangbangbook.bookId
				})
			}
		}
	}
</script>

<style>
	
	.www h3{
		margin-top: 55rpx;
		margin-right: 20rpx;
	}
	.comment p{
		color: gray;
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		margin-top: 10rpx;
	}
	.comment h2{
		margin-top: 30rpx;
		margin-bottom: 20rpx;
	}
	.comment{
		margin-left: 20rpx;
		
	}
	.book-item-text{
		height: 160rpx;
		font-size: 24rpx;
		line-height: 34rpx;
		margin-bottom: 20rpx;
		display: flex;
	}
	.book-item-text image{
		width: 100rpx;
		height: 140rpx;
		border-radius: 10rpx;
	}
</style>
